# 在一行中不断刷新倒计时

import time
count_down = 10
for i in range(count_down, 0, -1):
    msg = u"\r系统将在 " + str(i) + "秒　内自动退出"
    print(msg, end="")
    time.sleep(1)
end_msg = "结束" + "   "*(len(msg) -len("结束"))
print(u"\r" + end_msg)